package com.zzyl.nursing.controller.member;

import com.zzyl.common.core.domain.AjaxResult;
import com.zzyl.serve.service.INursingProjectService;
import com.zzyl.serve.vo.NursingProjectVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/member/orders/project")
@Api(tags = "小程序相关接口")
public class MemberOrdersController {
    @Autowired
    private INursingProjectService nursingProjectService;


    @PreAuthorize("@ss.hasPermi('member:orders:project:page')")
    @GetMapping("/page")
    @ApiOperation("小程序查询护理项目订单列表")
    public AjaxResult page() {
        Integer total = nursingProjectService.selectAll().size();
        List<NursingProjectVo> nursingProjectVos = nursingProjectService.selectAll();
        AjaxResult success = AjaxResult.success(nursingProjectVos);
        success.put("total", total);
        return success;
    }

}
